package com.sinoglobal.shakeprize.adapter;

import android.support.v4.view.ViewPager;
import android.view.View;

/**
 * @author temulu
 * @createdate 2015-8-26下午2:33:31
 * @Description 场次pager滑动动画
 */
public class AnimationPageTransformer implements ViewPager.PageTransformer{

	@Override
	public void transformPage(View paramView, float paramFloat) {
		if (paramFloat<=0) {
			float scaleFactor = 0.5f*(2+paramFloat);
			paramView.setScaleX( scaleFactor);
			paramView.setScaleY(scaleFactor);
		}else if (paramFloat>0) {
			float scaleFactor = 0.5f*(2-paramFloat);
			paramView.setScaleX( scaleFactor);
			paramView.setScaleY(scaleFactor);
		}
	}

}
